package com.banwoqiche.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @time: 2022-03-29 16:10
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @PreAuthorize("hasAuthority('test:test01')")
    @RequestMapping("/test01")
    public String test11(){
        return "test01";
    }
    @PreAuthorize("hasAuthority('test:test02')")
    @RequestMapping("/test02")
    public String test02(){
        return "test02";
    }
    @PreAuthorize("hasAuthority('test:test03')")
    @RequestMapping("/test03")
    public String test03(){
        return "test03";
    }
}
